package com.jz.yanshe.ui.widget;

import android.content.Context;
import android.util.AttributeSet;

import com.aspsine.swipetoloadlayout.SwipeRefreshTrigger;
import com.aspsine.swipetoloadlayout.SwipeTrigger;

/**
 * Created by Administrator on 2017/11/22.
 */

public class RefreshHeaderView extends android.support.v7.widget.AppCompatTextView implements SwipeRefreshTrigger, SwipeTrigger {
    public RefreshHeaderView(Context context) {
        super(context);
    }

    public RefreshHeaderView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public void onRefresh() {
        setText("正在拼命加载数据...");
    }

    @Override
    public void onPrepare() {
        setText("");
    }

    @Override
    public void onMove(int i, boolean b, boolean b1) {
        setText("释放刷新");
    }

//    @Override
//    public void onSwipe(int i, boolean b) {
//
//    }

    @Override
    public void onRelease() {

    }

    @Override
    public void onComplete() {

    }

//    @Override
//    public void complete() {
//
//    }

    @Override
    public void onReset() {
        setText("刷新成功");
    }



}
